From 2047794b40b140675ef6f5ae7be83ae4ae603e02 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 23 Sep 2023 16:13:12 +0100 Subject: Add tests for Patio code gen for tuples --- ...mpiler.testing.snapshots.Snapshotter)].expected | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTupleCreateTests]/[method:canGenerateCodeForTupleCreate(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTupleCreateTests]/[method:canGenerateCodeForTupleCreate(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTupleCreateTests]/[method:canGenerateCodeForTupleCreate(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTupleCreateTests]/[method:canGenerateCodeForTupleCreate(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..d725544c --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTupleCreateTests]/[method:canGenerateCodeForTupleCreate(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,44 @@ +Compilation unit elements: + + +Locals: + * (val "tuplePointer__0" data-ptr) + * (val "tupleElement__2__0" int) + * (val "tupleElement__1__0" int) + * (val "tupleElement__0__0" int) + * (val "tuple__0" int) + +Instructions: + +( + (alloc-heap (local "tuplePointer__0") (struct (int int int))) + (local-store (local "tupleElement__2__0") (local "d")) + ( + memory-store + pointer=(local "tuplePointer__0") + layout=(struct (int int int)) + offset=(2) + value=(local "tupleElement__2__0") + ) + (local-store (local "tupleElement__1__0") (local "c")) + ( + memory-store + pointer=(local "tuplePointer__0") + layout=(struct (int int int)) + offset=(1) + value=(local "tupleElement__1__0") + ) + (local-store (local "tupleElement__0__0") (local "b")) + ( + memory-store + pointer=(local "tuplePointer__0") + layout=(struct (int int int)) + offset=(0) + value=(local "tupleElement__0__0") + ) + (data-ptr-to-int (local "tuple__0") (local "tuplePointer__0")) +) + +Temporary stack: + * tuple__0 + * a -- cgit v1.2.3